package com.dex4d.ui.main.model;

import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;

import java.util.List;

/**
 * 作者    LiQingyi
 * 时间    2018/11/14 17:15
 * 文件    dex4d-android
 * 描述    获取token列表
 */
@Dao
public interface TokenContractDao {

    @Query("SELECT * FROM TokenContract")
    List<TokenContract> getAll();

    @Query("SELECT * FROM TokenContract WHERE name=(:symbol)")
    TokenContract getItem(String symbol);

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insertAll(List<TokenContract> tokenContracts);

}
